import Layout from '@/layout/index.vue'
 const AdminRoutes = [
  {
    path: "/",
    component: Layout,
    redirect: "/home",
    name: "首页",
    children: [
      {
        path: "home",
        name: "首页",
        component: () => import("@/views/home/index.vue"),
        meta: { title: "Home", icon: "home" },
      },
    ],
  },
  {
    path: '/example',
    component: Layout,
    redirect: '/example/table',
    name: '表格&树',
    meta: { title: 'Example', icon: 'home' },
    children: [
      {
        path: 'table',
        name: 'Table',
        component: () => import('@/views/table/table.vue'),
        meta: { title: '超级表格', icon: 'table' },
        children:[
          {
            path: 'proTable',
            component: () => import('@/views/table/adminTable/proTable.vue'),
            name: 'proTable',
            meta: { title: '使用VxeTable' },
          },
        ]
      },
      {
        path: 'menu1',
        name: 'Menu1',
        component: () => import('@/views/nested/menu1/index.vue'),
        meta: { title: '菜单一',icon:'home'},
        children: [
          {
            path: 'menu1-1',
            component: () => import('@/views/nested/menu1/menu1-1/index.vue'),
            name: 'Menu1-1',
            meta: { title: '菜单1-1' },
            children:[]
          },
          {
            path: 'menu1-2',
            component: () => import('@/views/nested/menu1/menu1-2/index.vue'),
            name: 'Menu1-2',
            meta: { title: '菜单1-2' },
            children:[
              {
                path: 'menu1-2-1',
                component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1/index.vue'),
                name: 'Menu1-2-1',
                meta: { title: '菜单1-2-1' },
                children:[]
              },
            ]
          },
        ]
      },
      {
        path: 'tree',
        name: 'Tree',
        component: () => import('@/views/tree/tree.vue'),
        meta: { title: '树', icon: 'tree' },
        children:[]
      },
    ]
  },
  { path: '/:pathMatch(.*)*', redirect: '/404', hidden: true }
];
export default AdminRoutes